/**
 * $Id$ Copyright 2009-2012 Oak Pacific Interactive. All rights reserved.
 */
package com.shuqi.database.model;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import com.shuqi.database.dao.OrmBaseModel;
import com.shuqi.model.manager.TxtDownLoadManager;

/**
 * 
 * 
 * @author <a href="mailto:">yaozhen</a>
 * @version 2014-3-7上午10:59:56
 */
@DatabaseTable(tableName = "txt_download")
public class TxtDownload extends OrmBaseModel {

    /** 数据库自增主键 */
    @DatabaseField(generatedId = true)
    private int _id;

    /** 离线书籍下载对应账号id */
    @DatabaseField(columnName = "user_id")
    private String userId;

    /** 离线书籍id */
    @DatabaseField(columnName = "book_id")
    private String bookId;

    /** 离线书籍名称 */
    @DatabaseField(columnName = "book_name")
    private String bookName;

    /** 离线书籍存储到本地的文件名称 */
    @DatabaseField(columnName = "file_name")
    private String fileName;

    /** 离线书籍文件作者名称 */
    @DatabaseField(columnName = "author_name")
    private String authorName;

    /** 离线书籍下载的url */
    @DatabaseField(columnName = "download_url")
    private String downloadUrl;

    /** 离线书籍本地存储路径 */
    @DatabaseField(columnName = "file_path")
    private String filePath;

    /** 离线书籍总大小 */
    @DatabaseField(columnName = "file_totla_size")
    private long fileTotalSize;

    /** 离线书籍已经下载的大小 */
    @DatabaseField(columnName = "file_download_size")
    private long fileDownloadSize;

    /** 离线书籍创建的时间 */
    @DatabaseField(columnName = "create_time")
    private long createTime;

    /** 离线书籍下载的状态位
     *  @see TxtDownLoadManager
     * */
    @DatabaseField(columnName = "download_status")
    private int downloadStatus;

    public String getUserId() {
        return userId;
    }

    public String getBookId() {
        return bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public String getFileName() {
        return fileName;
    }

    public String getAuthorName() {
        return authorName;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public String getFilePath() {
        return filePath;
    }

    public long getFileTotalSize() {
        return fileTotalSize;
    }

    public long getFileDownloadSize() {
        return fileDownloadSize;
    }

    public long getCreateTime() {
        return createTime;
    }

    public int getDownloadStatus() {
        return downloadStatus;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public void setFileTotalSize(long fileTotalSize) {
        this.fileTotalSize = fileTotalSize;
    }

    public void setFileDownloadSize(long fileDownloadSize) {
        this.fileDownloadSize = fileDownloadSize;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public void setDownloadStatus(int downloadStatus) {
        this.downloadStatus = downloadStatus;
    }

    public String getDownKey() {
        return bookId + "_" + downloadUrl;
    }

}
